﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ITS.DAL.Contents;
using ITS.DAL.Common;
using ITS.Website.Models;

namespace ITS.Website.Controllers
{
    [Authorize]
    public class AdminController : BaseController
    {
        private readonly IContentRepository _contentRepository;
        private readonly ICommonRepository _commonRepository;

        public AdminController(IContentRepository contentRepository, ICommonRepository commonRepository)
        {
            this._contentRepository = contentRepository;
            this._commonRepository = commonRepository;
        }

        public ActionResult Index()
        {
            AdminHompageViewModel model = new AdminHompageViewModel()
            {
                ContentCategories = _contentRepository.ContentCategories()
            };

            return View(model);
        }

    }
}
